package com.wxzz.elearing.course.api.server;

import com.alibaba.fastjson.JSONObject;
import com.wxzz.elearing.course.service.IStudyPlanService;
import com.wxzz.elearning.common.vo.ReturnVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/wx-user-study-plan-api")
public class WxUserStudyPlanApi {

    @Autowired
    private IStudyPlanService studyPlanService;

    /**
     * 查询学习计划绑定的用户
     * @param wxUserStudyPlanId
     * @param wxUserIds
     * @return
     */
    @RequestMapping(value = "/selectWxUserStudyPlan/{wxUserStudyPlanId}", method = RequestMethod.POST)
    public ReturnVO<List<JSONObject>> selectWxUserStudyPlan(@PathVariable Long wxUserStudyPlanId, @RequestBody List<Long> wxUserIds) {
        return studyPlanService.selectWxUserStudyPlan(wxUserStudyPlanId,wxUserIds);
    }

}
